<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册页面</title>
    <style>
        /* 页面背景 */
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f7fc;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        /* 表单容器 */
        .form-container {
            background-color: #fff;
            padding: 20px 30px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
        }

        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 20px;
        }

        /* 输入框 */
        .form-group {
            margin-bottom: 15px;
        }

        label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
            color: #555;
        }

        input[type="text"], input[type="password"], input[type="tel"], input[type="radio"] {
            width: 100%;
            padding: 10px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        input[type="radio"] {
            width: auto;
            margin-right: 10px;
        }

        /* 按钮 */
        button {
            width: 100%;
            padding: 10px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
        }

        button:hover {
            background-color: #45a049;
        }

        /* 性别单选框 */
        .gender-group {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .gender-group label {
            margin-right: 10px;
        }

        /* 响应式设计 */
        @media (max-width: 480px) {
            .form-container {
                padding: 15px;
                width: 100%;
            }
        }
    </style>
</head>
<body>
<div class="form-container">
    <h2>用户注册</h2>
    <form action="/regist" method="post">
        <!-- 用户名 -->
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" name="username" placeholder="请输入用户名" required>
        </div>

        <!-- 密码 -->
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>
        </div>

        <!-- 手机号 -->
        <div class="form-group">
            <label for="phone">手机号</label>
            <input type="tel" id="phone" name="phone" placeholder="请输入手机号" required>
        </div>

        <!-- 性别 -->
        <div class="form-group gender-group">
            <label>性别</label>
            <label>
                <input type="radio" name="sex" value="1"> 男
            </label>
            <label>
                <input type="radio" name="sex" value="2"> 女
            </label>
        </div>

        <!-- 注册按钮 -->
        <button type="submit">注册</button>
    </form>
</div>
</body>
</html>
